#ifndef TRANSITION_H_
#define TRANSITION_H_

#include <iostream>
#include <ostream>
#include <string>
#include <set>

static const char EPSILON = '\0';
using namespace std;

namespace dfa {

template <class DataType>
class Transition
{
public:
	Transition();
	Transition(DataType from, char sym, DataType to);
	Transition(const Transition<DataType> &transition);
	virtual ~Transition();
	DataType getFromState();
	DataType getToState();
	char getSymbol();

	bool operator ==(const Transition<DataType> & right) const; 
	bool operator <(const Transition<DataType> & right) const;
	friend ostream& operator <<(ostream &os,const Transition<DataType> &transition)
	{
		os << transition.fromState << " -> ";
		if (transition.symbol == EPSILON) {
			os << "EPS";
		} else {
			os << transition.symbol;
		}
		os << " -> " << transition.toState;
		return os;
	}
	
private:
	DataType fromState;
	char symbol;
	DataType toState;	
};
#include "Transition.cpp"
}
#endif